import { Route } from 'react-router'
import {IndexRedirect} from 'react-router';
import { WeaErrorPage ,WeaLocaleProvider} from 'ecCom';

import stores from './stores';

import './style';
import './util';

import Home from './components/Home';
import InfoReport from './components/infoReport/infoReport';       //新建上报
import InfoReportList from './components/infoReport/infoReportList';      //上报信息list
import InfoFeedback from './components/infoReport/infoFeedback';      //信息反馈
import Search from './components/search/search';      //上报信息查询
import SearchResult from './components/search/searchResult';      //上报信息查询结果

import HandleList from './components/infoHandle/handleList';      //上报信息待处理
import InfoHandleCard from './components/infoHandle/infoHandleCard';      //上报信息处理卡片
import Composing from './components/infoHandle/composing';      //排版

import AdjustList from './components/infoAdjust/adjustList';      //奖惩列表
import InfoCount from './components/infoCount/infoCount';      //奖惩列表
import infoWordMerge from './components/infoWordMerge/infoWordMerge';      //生成清样
import infoCreateNotif from './components/infoWordMerge/infoCreateNotif';      //生成通报
import infoCreateFeedBack from './components/infoWordMerge/infoCreateFeedBack';      //生成反馈函

// import waitInfoSift from './components/infoSift/waitInfoSift';      //待处理信息
// import usedInfoSift from './components/infoSift/usedInfoSift';      //已采用信息
// import waitInfoEdit from './components/infoSift/waitInfoEdit';      //待编辑信息
// import waitInfoEditCard from './components/infoSift/waitInfoEditCard';      //待编辑信息卡片

const getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, 'info');
window.info_store = stores;

class Error extends React.Component {
    render() { 
      return (
        <WeaErrorPage ecId={`${this && this.props && this.props.ecId || ''}_WeaErrorPage@mu29hj`} msg="对不起，无法找到该页面！" />
      )
    }
}

const  Routes = (
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@l9gv5b`} path="info" name="info" breadcrumbName="信息采编" onEnter={getLocaleLabel} component={Home}>
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@89vjyq`} name="infoReport" path="infoReport" breadcrumbName="新建上报"  component={InfoReport} />
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@ys50ay`} name="infoReportList" path="infoReportList/:type" breadcrumbName="上报信息list"  component={InfoReportList} />

        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@he90nk`} name="infoFeedback" path="infoFeedback" breadcrumbName="信息反馈"  component={InfoFeedback} />
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@89dzri`} name="search" path="search" breadcrumbName="信息查询"  component={Search} />
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@nzws57`} name="searchResult" path="searchResult" breadcrumbName="信息查询结果" component={ SearchResult }/>

        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@jdzwtq`} name="handleList" path="handleList/:type" breadcrumbName="待处理信息列表" component={ HandleList }/>
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@e7mukj`} name="infoHandleCard" path="infoHandleCard" breadcrumbName="信息处理卡片" component={ InfoHandleCard }/>
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@4yei4c`} name="composing" path="composing" breadcrumbName="排版" component={ Composing }/>

        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@je0u27`} name="adjustList" path="adjustList" breadcrumbName="奖惩" component={ AdjustList }/>
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@jyc1d8`} name="infoCount" path="infoCount" breadcrumbName="统计" component={ InfoCount }/>

        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@jyc1d8`} name="infoWordMerge" path="infoWordMerge" breadcrumbName="生成清样" component={infoWordMerge  }/>
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@jyc1d8`} name="infoCreateNotif" path="infoCreateNotif" breadcrumbName="生成通报" component={infoCreateNotif  }/>
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@jyc1d8`} name="infoCreateNotif" path="infoCreateFeedBack" breadcrumbName="生成反馈函" component={infoCreateFeedBack  }/>

        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@ok3e6h`} path="*" component={Error}></Route>
    </Route>
);

module.exports =  {
    Route:Routes,
    store:stores,
}